package com.idione.model;

import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;

public class DBAdapter {
    
    private DBSQLiteHelper DBHelper;
    private SQLiteDatabase db;
    
    public DBAdapter(Context ctx) {
        DBHelper = new DBSQLiteHelper(ctx);
    }
    
    //---opens the database---
    public void open() throws SQLException {
        db = DBHelper.getWritableDatabase();
    }

    //---closes the database---    
    public void close() {
        DBHelper.close();
    }
    
    public SQLiteDatabase getDB() {
    	return db;
    }
}